function uuid(length: number = 30, prefix: string = '') {
  let guid = '';
  for (let i = 1; i <= length; i++) {
    let n = Math.floor(Math.random() * 16.0).toString(16);
    guid += n;
  }
  return `${prefix ? `${prefix}-` : ''}${guid}`;
}

const $util = {
  uuid
}

export default $util